package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.HomeBannerExample.E_JUMP_LINK;
import static org.jsola.hr.example.HomeBannerExample.E_SORT;
import static org.jsola.hr.example.HomeBannerExample.E_URL;
import static org.jsola.hr.example.HomeBannerExample.M_JUMP_LINK_MAX;
import static org.jsola.hr.example.HomeBannerExample.M_JUMP_LINK_NOT_NULL;
import static org.jsola.hr.example.HomeBannerExample.M_URL_MAX;
import static org.jsola.hr.example.HomeBannerExample.M_URL_NOT_NULL;
import static org.jsola.hr.example.HomeBannerExample.N_JUMP_LINK;
import static org.jsola.hr.example.HomeBannerExample.N_SORT;
import static org.jsola.hr.example.HomeBannerExample.N_URL;

/**
 * 卫人云-首页Banner管理
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【卫人云-首页Banner管理】的参数")
@Data
public class HomeBannerAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_URL, example = E_URL, required = true)
    @NotNull(message = M_URL_NOT_NULL)
    @Length(max = 500, message = M_URL_MAX)
    private String url;

    @ApiModelProperty(notes = N_JUMP_LINK, example = E_JUMP_LINK, required = true)
    @NotNull(message = M_JUMP_LINK_NOT_NULL)
    @Length(max = 500, message = M_JUMP_LINK_MAX)
    private String jumpLink;

    @ApiModelProperty(notes = N_SORT, example = E_SORT)
    private Integer sort;


}

